Htt = squeeze(sXtransParam.Y_sys(1,2,:));               % get H_tt
Ar = sXtransParam.AR;                                   % transducer area
Zxd = 1./squeeze(sXtransParam.Y_sys(1,1,:))/sXtransParam.AR;    % transducer electrical impedance
f=sXtransParam.df:sXtransParam.df:sXtransParam.FMAX;            % frequencies coverd (MHz)

w = 2*pi*f'*1e6;
Lt = 17.4e-6;                   % tuning inductance
ZL=200;                         % preamp resistans
Cc = 100e-12;                   % cable capacitance

Hr1= Zxd*ZL./(Zxd+ZL);          % receive transfer functions
Hr2 = Zxd*ZL./(Zxd+ZL+j*w*Lt);
Hr3 = Zxd*ZL./(Zxd+ZL+j*w.*(Lt+Cc.*Zxd.*ZL)-w.^2*Cc*Lt*ZL);

V1 = 2*Htt*Ar.*Hr1;             % receive voltage for 1Pa incoming wave
V2 = 2*Htt*Ar.*Hr2;
V3 = 2*Htt*Ar.*Hr3;

figure
plot(f,20*log10(abs(V1)/max(abs(V2))),f,20*log10(abs(V2)/max(abs(V2))),f,20*log10(abs(V3)/max(abs(V2))))
axis([0 15 -30 0])
grid on
xlabel('f   (MHz)')
ylabel('V_{rx}   (dB)')
legend('Z_L = 200 \Omega','Z_L = 200 \Omega+ tuning','Z_L = 200 \Omega+tuning+cable')
axis([0 15 -30 0])

%%
f0 = 2.5e6;
dt = 1/sXtransParam.FMAX*1e-6/2;        % sample frequency at double frequency
sig = sin(2*pi*f0*(0:dt:1/f0))';        % pulse is sinus 1 periode    
Sig = fft(sig,length(f)*2);
V1s = Sig(2:length(f)+1).*V1;           % pick frequencies in accordance with those from xTrans
V2s = Sig(2:length(f)+1).*V2;
V3s = Sig(2:length(f)+1).*V3;

v1s = real(ifft([0;V1s]));              % inverse fourier transfor of positive frequencies
v2s = real(ifft([0;V2s]));
v3s = real(ifft([0;V3s]));
t = (0:length(v1s)-1)*dt*2;
figure
plot(t*1e6,v1s,t*1e6,v2s,t*1e6,v3s)
grid on
xlabel('t   (\mus)')
ylabel('v_{rx}   (\muV)')
legend('Z_L = 200 \Omega','Z_L = 200 \Omega+ tuning','Z_L = 200 \Omega+tuning+cable')